html,body{
  margin: 0;
  padding: 0;
  background: #151718;
  height: 100%;
  overflow: hidden;
}

#paper .loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  z-index: 999;
  font-size: 14px;
  padding: 6px;
  background-color: rgba(0,0,0,0.6);
}

#paper .loading.hide {
  transition: opacity 1s;
  opacity: 0;
}

#main {
  display: flex;
  color: white;
  height: 100%;
}

#menu {
  position: absolute;
  z-index: 999;
  width: 240px;
  user-select: none;
  height: 100%;
}

#menu .wrap {
  overflow: hidden;
  opacity: 0.8;
  background-color: #000;
}

#menu .wrap::after {
  content: ' ';
  width: 30px;
  height: 30px;
  position: absolute;
  right: 37px;
  margin-top: -40px;
  background-image: url(https://p0.ssl.qhimg.com/t010824825edcb60364.png);
  background-size: 100% 100%;
}

#menu .wrap.d1::after {
  transition: transform 1s;
  transform: rotate(90deg);  
}

#menu .wrap.d2::after {
  transition: transform 1s;
  transform: rotate(180deg);  
}

#menu .wrap.d3::after {
  transition: transform 1s;
  transform: rotate(270deg);  
}

#menu .wrap.d0::after {
  transition: transform 1s;
  transform: rotate(0deg);  
}

#menu .header {
  display: block;
  width: 117px;
  height: 60px;
  background-image: url(https://p3.ssl.qhimg.com/t013bc02448b18354e8.png);
  background-size: 100% 100%; 
  padding: 0;
  margin: 10px 30px;
}

#menu .wrap-menu {
  height: 100%;
  overflow-y: auto;
}

#menu.hide {
  height: 0;
}

#menu .wrap-menu::-webkit-scrollbar {
  width: 0;
}

#menu ul {
  padding: 0;
  margin: 0;
  background-color: #000;
  opacity: 0.8;
  margin-bottom: 80px;
}

#menu li{
  padding: 0 2.5em;
  margin: 0;
  list-style:none;
  color: #fff;
  opacity: 0.8;
  transition: opacity .5s ease-in;
  font-size: 16px;
  letter-spacing: 0;
  line-height: 32px;
}

#menu.hide ul {
  display: none;
}

#menu.fade ul {
  transition: opacity .5s ease-in;
  opacity: 0;
}

#menu li.title {
  padding-left: 2em;
}

#menu li:nth-child(2) {
  padding-top: 0.5em;
}

#menu li:nth-last-child(1) {
  padding-bottom: 0.5em;
}

#demo {
  min-width: 400px;
  max-width: 800px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}


#paper {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-top:100%;
  height: 0px;
}

#paper iframe{
  position: absolute;
  top: 0;
  left: 0;
  border: none;
  width: 100%;
  height: 100%;
}

#console-panel{
  font-size: 14px;
  line-height: 28px;
  background-color: #222;
}

#console-panel span {
  display: inline-block;
  padding: 0 10px;
  background-color: #333;
}

#console-panel a {
  float: right;
  margin-right: 10px;
}

#output {
  margin: 0;
  width: 100%;
  height: 100%;
  background-color: #333;
  overflow-y: auto;
  font-size: 14px;
  line-height: 28px;
}

#output div {
  word-wrap: break-all;
  max-width: 66%;
}

#output .info {
  color: #38E152;
}

#output .warn {
  color: rgb(191, 191, 15);
}

#output .error {
  color: rgb(233, 77, 77);
}

#code {
  max-width: 50%;
  display: flex;
  flex-grow: 0.5;
}

#code textarea {
  opacity: 0;
}

#fork {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 999;
}

#fork a {
  display: inline-block;
  opacity: 0.5;
}

#fork a:hover {
  opacity: 1;
}

a, a:visited {
  text-decoration:none;
  color:#fff;
}

a:hover {
  text-decoration:underline;
  color:#1EAC61;;
}

a.selected {
  color:#1EAC61;;
}

.cm-s-seti.CodeMirror {
  height: 100%;
  width: 100%;
}

@media screen and (max-width:480px){
  #main {
    background-color: rgba(33,33,33,1)
  }
  #code, #fork {
    display:none;
  }
  #demo {
    min-width: 300px;
  }
  #output div {
    max-width: 100%;
  } 
  #menu .wrap {
    transform: scale(.5);
    transform-origin: 0 0;
    background-color: transparent;
  }
  #menu ul {
    display: none;
  }
}
